name: pre-commit run_id: commands[2] env HOME: /home/jenkins env LANG: C.UTF-8 env PATH: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-eelT/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PYTHONHASHSEED: 459624983 env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONIOENCODING: utf-8 env OLM_TIMER1: 3000 env OLM_TIMER2: 2000 env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/transportpce-tox-verify-transportpce-master/.tox env TOX_ENV_DIR: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit env VIRTUAL_ENV: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit metadata pid: 29148 cwd: /w/workspace/transportpce-tox-verify-transportpce-master/tests allow: /w/workspace/transportpce-tox-verify-transportpce-master/.tox/pre-commit/bin/*:sh:cpan:sudo:which:fixCIcentOS8reposMirrors.sh cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [WARNING] hook id `remove-tabs` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [WARNING] hook id `perltidy` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Initializing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Initializing environment for https://github.com/perltidy/perltidy. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pre-commit/mirrors-autopep8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/perltidy/perltidy. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Passed Tabs remover.............................................................Passed autopep8.................................................................Failed - hook id: autopep8 - files were modified by this hook perltidy.................................................................Passed pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py b/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py index b0403c0b..9773dd08 100644 --- a/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py +++ b/tests/transportpce_tests/1.2.1/test02_topo_portmapping.py @@ -56,7 +56,7 @@ class TransportPCEtesting(unittest.TestCase): for node in resTopo['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue response = test_utils.get_portmapping_node_attr(nodeMapId, "node-info", None) self.assertEqual(response['status_code'], requests.codes.ok) diff --git a/tests/transportpce_tests/1.2.1/test03_topology.py b/tests/transportpce_tests/1.2.1/test03_topology.py index 4cac2581..df42f53e 100644 --- a/tests/transportpce_tests/1.2.1/test03_topology.py +++ b/tests/transportpce_tests/1.2.1/test03_topology.py @@ -165,7 +165,7 @@ class TransportPCETopologyTesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue nodeType = node['org-openroadm-common-network:node-type'] self.assertIn({'network-ref': 'openroadm-network', 'node-ref': 'ROADMA01'}, node['supporting-node']) @@ -199,7 +199,7 @@ class TransportPCETopologyTesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue self.assertEqual(node['supporting-node'][0]['network-ref'], 'clli-network') self.assertEqual(node['supporting-node'][0]['node-ref'], 'NodeA') @@ -221,7 +221,7 @@ class TransportPCETopologyTesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue nodeType = node['org-openroadm-common-network:node-type'] # Tests related to XPDRA nodes @@ -361,7 +361,7 @@ class TransportPCETopologyTesting(unittest.TestCase): self.assertEqual(node['supporting-node'][0]['network-ref'], 'clli-network') nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue self.assertIn(nodeId, CHECK_LIST) self.assertEqual(node['supporting-node'][0]['node-ref'], @@ -438,7 +438,7 @@ class TransportPCETopologyTesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue nodeType = node['org-openroadm-common-network:node-type'] # Tests related to XPDRA nodes @@ -550,7 +550,7 @@ class TransportPCETopologyTesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue self.assertIn(nodeId, listNode) self.assertEqual(node['org-openroadm-clli-network:clli'], nodeId) @@ -643,7 +643,7 @@ class TransportPCETopologyTesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue nodeType = node['org-openroadm-common-network:node-type'] # Tests related to XPDRA nodes @@ -716,7 +716,7 @@ class TransportPCETopologyTesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue self.assertIn({'network-ref': 'openroadm-network', 'node-ref': 'ROADMA01'}, node['supporting-node']) nodeType = node['org-openroadm-common-network:node-type'] diff --git a/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py b/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py index 68699b00..e0a1ffaf 100644 --- a/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py +++ b/tests/transportpce_tests/2.2.1/test02_topo_portmapping.py @@ -59,7 +59,7 @@ class TransportPCEtesting(unittest.TestCase): # pylint: disable=consider-using-f-string print("nodeId={}".format(nodeId)) nodeMapId = nodeId.split("-")[0] + "-" + nodeId.split("-")[1] - if (nodeMapId == 'TAPI-SBI') : + if (nodeMapId == 'TAPI-SBI'): continue print("nodeMapId={}".format(nodeMapId)) response = test_utils.get_portmapping_node_attr(nodeMapId, "node-info", None) diff --git a/tests/transportpce_tests/2.2.1/test03_topology.py b/tests/transportpce_tests/2.2.1/test03_topology.py index 97c9a1fb..6bbf7c3e 100644 --- a/tests/transportpce_tests/2.2.1/test03_topology.py +++ b/tests/transportpce_tests/2.2.1/test03_topology.py @@ -168,7 +168,7 @@ class TransportPCEtesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue nodeType = node['org-openroadm-common-network:node-type'] self.assertIn({'network-ref': 'openroadm-network', 'node-ref': 'ROADM-A1'}, node['supporting-node']) @@ -202,7 +202,7 @@ class TransportPCEtesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue self.assertEqual(node['supporting-node'][0]['network-ref'], 'clli-network') self.assertEqual(node['supporting-node'][0]['node-ref'], 'NodeA') @@ -224,7 +224,7 @@ class TransportPCEtesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue nodeType = node['org-openroadm-common-network:node-type'] # Tests related to XPDRA nodes @@ -367,7 +367,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(node['supporting-node'][0]['network-ref'], 'clli-network') nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue if nodeId in CHECK_LIST: self.assertEqual(node['supporting-node'][0]['node-ref'], CHECK_LIST[nodeId]['node-ref']) @@ -446,7 +446,7 @@ class TransportPCEtesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue nodeType = node['org-openroadm-common-network:node-type'] if nodeId == 'XPDR-A1-XPDR1': @@ -563,7 +563,7 @@ class TransportPCEtesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue self.assertIn(nodeId, listNode) self.assertEqual(node['org-openroadm-clli-network:clli'], nodeId) @@ -657,7 +657,7 @@ class TransportPCEtesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue nodeType = node['org-openroadm-common-network:node-type'] # Tests related to XPDRA nodes @@ -734,7 +734,7 @@ class TransportPCEtesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue self.assertIn({'network-ref': 'openroadm-network', 'node-ref': 'ROADM-A1'}, node['supporting-node']) nodeType = node['org-openroadm-common-network:node-type'] diff --git a/tests/transportpce_tests/2.2.1/test04_otn_topology.py b/tests/transportpce_tests/2.2.1/test04_otn_topology.py index f1d1ec77..3a34bf5f 100644 --- a/tests/transportpce_tests/2.2.1/test04_otn_topology.py +++ b/tests/transportpce_tests/2.2.1/test04_otn_topology.py @@ -86,7 +86,7 @@ class TransportPCEtesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue self.assertIn({'network-ref': 'openroadm-network', 'node-ref': 'SPDR-SA1'}, node['supporting-node']) self.assertIn({'network-ref': 'clli-network', 'node-ref': 'NodeSA'}, node['supporting-node']) @@ -150,7 +150,7 @@ class TransportPCEtesting(unittest.TestCase): for node in response['network'][0]['node']: nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue if nodeId in CHECK_LIST: self.assertEqual(node['org-openroadm-common-network:node-type'], CHECK_LIST[nodeId]['node-type']) diff --git a/tests/transportpce_tests/hybrid/test01_device_change_notifications.py b/tests/transportpce_tests/hybrid/test01_device_change_notifications.py index ed8593da..96865e50 100644 --- a/tests/transportpce_tests/hybrid/test01_device_change_notifications.py +++ b/tests/transportpce_tests/hybrid/test01_device_change_notifications.py @@ -235,7 +235,7 @@ class TransportPCEFulltesting(unittest.TestCase): self.assertEqual(node['org-openroadm-common-network:administrative-state'], 'inService') nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue tp_list = node['ietf-network-topology:termination-point'] for tp in tp_list: @@ -301,7 +301,7 @@ class TransportPCEFulltesting(unittest.TestCase): self.assertEqual(node['org-openroadm-common-network:operational-state'], 'inService') self.assertEqual(node['org-openroadm-common-network:administrative-state'], 'inService') nodeMapId = node['node-id'].split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue tp_list = node['ietf-network-topology:termination-point'] for tp in tp_list: @@ -356,7 +356,7 @@ class TransportPCEFulltesting(unittest.TestCase): self.assertEqual(node['org-openroadm-common-network:administrative-state'], 'inService') nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue tp_list = node['ietf-network-topology:termination-point'] for tp in tp_list: @@ -444,7 +444,7 @@ class TransportPCEFulltesting(unittest.TestCase): self.assertEqual(node['org-openroadm-common-network:administrative-state'], 'inService') nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue tp_list = node['ietf-network-topology:termination-point'] for tp in tp_list: @@ -530,7 +530,7 @@ class TransportPCEFulltesting(unittest.TestCase): self.assertEqual(node['org-openroadm-common-network:administrative-state'], 'inService') nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue tp_list = node['ietf-network-topology:termination-point'] for tp in tp_list: @@ -616,7 +616,7 @@ class TransportPCEFulltesting(unittest.TestCase): self.assertEqual(node['org-openroadm-common-network:administrative-state'], 'inService') nodeId = node['node-id'] nodeMapId = nodeId.split("-")[0] - if (nodeMapId == 'TAPI') : + if (nodeMapId == 'TAPI'): continue tp_list = node['ietf-network-topology:termination-point'] for tp in tp_list: diff --git a/tests/transportpce_tests/network/test01_topo_extension.py b/tests/transportpce_tests/network/test01_topo_extension.py index 3b926d11..2141085d 100644 --- a/tests/transportpce_tests/network/test01_topo_extension.py +++ b/tests/transportpce_tests/network/test01_topo_extension.py @@ -198,7 +198,7 @@ class TransportPCEtesting(unittest.TestCase): response = test_utils.transportpce_api_rpc_request( 'transportpce-networkutils', 'init-xpdr-rdm-links', {'links-input': {'xpdr-node': 'SPDR-SA1', 'xpdr-num': '1', 'network-num': '1', - 'rdm-node': 'ROADM-TA1', 'termination-point-num' : 'SRG1-PP1-TXRX', + 'rdm-node': 'ROADM-TA1', 'termination-point-num': 'SRG1-PP1-TXRX', 'rdm-topology-uuid': 'a21e4756-4d70-3d40-95b6-f7f630b4a13b', 'rdm-nep-uuid': '3c3c3679-ccd7-3343-9f36-bdb7bea11a84', 'rdm-node-uuid': 'f929e2dc-3c08-32c3-985f-c126023efc43'}}) @@ -210,7 +210,7 @@ class TransportPCEtesting(unittest.TestCase): response = test_utils.transportpce_api_rpc_request( 'transportpce-networkutils', 'init-rdm-xpdr-links', {'links-input': {'xpdr-node': 'SPDR-SA1', 'xpdr-num': '1', 'network-num': '1', - 'rdm-node': 'ROADM-TA1', 'termination-point-num' : 'SRG1-PP1-TXRX', + 'rdm-node': 'ROADM-TA1', 'termination-point-num': 'SRG1-PP1-TXRX', 'rdm-topology-uuid': 'a21e4756-4d70-3d40-95b6-f7f630b4a13b', 'rdm-nep-uuid': '3c3c3679-ccd7-3343-9f36-bdb7bea11a84', 'rdm-node-uuid': 'f929e2dc-3c08-32c3-985f-c126023efc43'}}) @@ -222,7 +222,7 @@ class TransportPCEtesting(unittest.TestCase): response = test_utils.transportpce_api_rpc_request( 'transportpce-networkutils', 'init-xpdr-rdm-links', {'links-input': {'xpdr-node': 'SPDR-SC1', 'xpdr-num': '1', 'network-num': '1', - 'rdm-node': 'ROADM-TC1', 'termination-point-num' : 'SRG1-PP1-TXRX', + 'rdm-node': 'ROADM-TC1', 'termination-point-num': 'SRG1-PP1-TXRX', 'rdm-topology-uuid': 'a21e4756-4d70-3d40-95b6-f7f630b4a13b', 'rdm-nep-uuid': 'e5a9d17d-40cd-3733-b736-cc787a876195', 'rdm-node-uuid': '7a44ea23-90d1-357d-8754-6e88d404b670'}}) @@ -234,7 +234,7 @@ class TransportPCEtesting(unittest.TestCase): response = test_utils.transportpce_api_rpc_request( 'transportpce-networkutils', 'init-rdm-xpdr-links', {'links-input': {'xpdr-node': 'SPDR-SC1', 'xpdr-num': '1', 'network-num': '1', - 'rdm-node': 'ROADM-TC1', 'termination-point-num' : 'SRG1-PP1-TXRX', + 'rdm-node': 'ROADM-TC1', 'termination-point-num': 'SRG1-PP1-TXRX', 'rdm-topology-uuid': 'a21e4756-4d70-3d40-95b6-f7f630b4a13b', 'rdm-nep-uuid': 'e5a9d17d-40cd-3733-b736-cc787a876195', 'rdm-node-uuid': '7a44ea23-90d1-357d-8754-6e88d404b670'}}) @@ -262,9 +262,9 @@ class TransportPCEtesting(unittest.TestCase): 'transportpce-networkutils', 'init-inter-domain-links', {'a-end': {'rdm-node': 'ROADM-A1', 'deg-num': '1', 'termination-point': 'DEG1-TTP-TXRX'}, 'z-end': {'rdm-node': 'ROADM-TA1', 'deg-num': '2', 'termination-point': 'DEG2-TTP-TXRX', - 'rdm-topology-uuid': 'a21e4756-4d70-3d40-95b6-f7f630b4a13b', - 'rdm-nep-uuid': 'd42ed13c-d81f-3136-a7d8-b283681031d4', - 'rdm-node-uuid': 'f929e2dc-3c08-32c3-985f-c126023efc43'}}) + 'rdm-topology-uuid': 'a21e4756-4d70-3d40-95b6-f7f630b4a13b', + 'rdm-nep-uuid': 'd42ed13c-d81f-3136-a7d8-b283681031d4', + 'rdm-node-uuid': 'f929e2dc-3c08-32c3-985f-c126023efc43'}}) self.assertEqual(response['status_code'], requests.codes.ok) print(response['output']['result']) time.sleep(2) @@ -274,9 +274,9 @@ class TransportPCEtesting(unittest.TestCase): 'transportpce-networkutils', 'init-inter-domain-links', {'a-end': {'rdm-node': 'ROADM-C1', 'deg-num': '2', 'termination-point': 'DEG2-TTP-TXRX'}, 'z-end': {'rdm-node': 'ROADM-TC1', 'deg-num': '1', 'termination-point': 'DEG1-TTP-TXRX', - 'rdm-topology-uuid': 'a21e4756-4d70-3d40-95b6-f7f630b4a13b', - 'rdm-nep-uuid': 'fb3a00c1-342f-3cdc-b83d-2c257de298c1', - 'rdm-node-uuid': '7a44ea23-90d1-357d-8754-6e88d404b670'}}) + 'rdm-topology-uuid': 'a21e4756-4d70-3d40-95b6-f7f630b4a13b', + 'rdm-nep-uuid': 'fb3a00c1-342f-3cdc-b83d-2c257de298c1', + 'rdm-node-uuid': '7a44ea23-90d1-357d-8754-6e88d404b670'}}) self.assertEqual(response['status_code'], requests.codes.ok) print(response['output']['result']) response = test_utils.get_ietf_network_request('openroadm-topology', 'config') @@ -304,15 +304,15 @@ class TransportPCEtesting(unittest.TestCase): linkType = link['org-openroadm-common-network:link-type'] if 'transportpce-or-network-augmentation:link-class' in link.keys(): linkClass = link['transportpce-or-network-augmentation:link-class'] - if (linkType == 'ROADM-TO-ROADM' and linkClass == 'inter-domain') : + if (linkType == 'ROADM-TO-ROADM' and linkClass == 'inter-domain'): find = linkId in check_list self.assertEqual(find, True) interDomainLinkNber += 1 - if (linkType == 'XPONDER-OUTPUT' and linkClass == 'alien-to-tapi') : + if (linkType == 'XPONDER-OUTPUT' and linkClass == 'alien-to-tapi'): find = linkId in check_list self.assertEqual(find, True) alienToTapiLinkNber += 1 - if (linkType == 'XPONDER-INPUT' and linkClass == 'alien-to-tapi') : + if (linkType == 'XPONDER-INPUT' and linkClass == 'alien-to-tapi'): find = linkId in check_list self.assertEqual(find, True) alienToTapiLinkNber += 1